
Last chance! 50% off unlimited learning
Sale ends in
Multivariate normal random values simulation on the simplex.
rcompnorm(n, m, s, type = "alr")
The sample size, a numerical value.
The mean vector in
The covariance matrix in
The alr (type = "alr") or the ilr (type = "ilr") is to be used for closing the Euclidean data onto the simplex.
A matrix with the simulated data.
The algorithm is straightforward, generate random values from a multivariate normal distribution in
Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.
# NOT RUN {
x <- as.matrix(iris[, 1:2])
m <- colMeans(x)
s <- var(x)
y <- rcompnorm(100, m, s)
comp.den(y)
ternary(y)
# }
Run the code above in your browser using DataLab